package com.io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class Test_6 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        //反序列化
        String path="D:\\javacode\\javacode\\J2024_11_17\\c.dat";
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(path));
        System.out.println(ois.readInt());
        System.out.println( ois.readDouble());
        System.out.println( ois.readBoolean());
     //   System.out.println(ois.readUTF());
        Object dog=ois.readObject();
        System.out.println(ois.readUTF());
        System.out.println(dog);
        Dog dog1=(Dog)dog;
        System.out.println(dog1.getClass());
        System.out.println(dog1);
       // System.out.println(dog1);


      //  System.out.println(ois.read);
      //  ois.read
        ois.close();

    }
}
